package sctu.edu.java.year2016.team07.wenjia.day20160602.Chapter10_2;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import sctu.edu.java.year2016.team08.yangying.day20160527.chapter7_1.S;


import java.util.*;

/**
 * Created by 001 on 2016/6/2.
 * 分别向set集合以及list集合中添加"A","a","c","C","a"5个元素
 * 观察重复"a"能否在List集合以及Set集合中添加成功
 */
public class Collection {

    public static void main(String[] args) {

        List<String> list=new LinkedList<>();

       String a = "A", b = "a", c = "c", d = "C", e = "a";



            list.add(a);
            list.add(b);
            list.add(c);
            list.add(d);
            list.add(e);
        Set<String> set=new HashSet<>();
        set.addAll(list);
        System.out.println("输出list集合元素：" + list);

        System.out.println("输出set集合元素：" + set);

    }
}
